<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Change Password Page</title>
    </head>
    <body>
        <%
            HttpSession passss = request.getSession();
            String acc_id_pass = passss.getAttribute("acc_id").toString();
            String username_pass = passss.getAttribute("username").toString();
            String full_name_pass = passss.getAttribute("full_name").toString();
            if (request.getAttribute("msg") != null && !request.getAttribute("msg").equals("")) {
        %>
        <font color="green"> <%= request.getAttribute("msg")%> </font>
        <%
        } else {
            if (request.getAttribute("error") != null) {
        %>
        <font color="red" > <%= request.getAttribute("error")%> </font>
        <%
            }
        %>

        <form action="changePassStudent" method="post">
            <input type="hidden" name="acc_id" value="<%= acc_id_pass%>">
            <table>                
                <tr> 
                    <td>Username</td>
                    <td> <%= username_pass%></td>
                </tr>
                <tr>
                    <td> Full Name  </td>
                    <td> <%= full_name_pass%></td>
                </tr>
                <tr>
                    <td>Old Password   </td>
                    <td><input type="password" name="old_password" value=""></td>
                </tr>
                <tr>
                    <td>New Password </td>
                    <td><input type="password" name="new_password1" value=""></td>
                </tr>
                <tr>
                    <td>Confirm Password</td>
                    <td><input type="password" name="new_password2" value=""></td>
                </tr>
                <tr>
                    <td></td>
                    <td><input type="submit" value="Change PassWord"></td>
                </tr>                
            </table>
        </form>
        <%
            }
        %>
    </body>
</html>
